<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateNewsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('message', function(Blueprint $table)
        {
            $table->increments('id');
            $table->string('title')->nullable()->comment('标题');
            $table->text('content')->nullable()->comment('内容');
            $table->string('type')->nullable()->comment('类型');
            $table->integer('send_user_id')->default(0)->comment('发送者');
            $table->integer('receive_user_id')->default(0)->comment('接收者');
            $table->integer('is_read')->default(0)->comment('是否已读');
            $table->timestamp('read_time')->nullable()->comment('读取时间');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
